﻿using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace mozhi.smarterp.Finance.Treasuries.Payments
{
    public class PaymentRequisitionLink : AggregateRoot<Guid>, IMultiTenant
    {
        public Guid? TenantId { private set; get; }

        public Guid PaymentId { private set; get; }

        public Guid PaymentRequisitionId { private set; get; }

        private PaymentRequisitionLink() { }

        public PaymentRequisitionLink(Guid id, Guid paymentId, Guid paymentRequisitionId)
        {
            Id = id;
            PaymentId = paymentId;
            PaymentRequisitionId = paymentRequisitionId;

            Validate();
        }

        #region
        private void Validate()
        {
            Check.NotDefaultOrNull<Guid>(PaymentId , nameof(PaymentId));
            Check.NotDefaultOrNull<Guid>(PaymentRequisitionId, nameof(PaymentRequisitionId));
        }
        #endregion
    }
}
